<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">

<h:head>

</h:head>
<h:body>
	<h:form id="frmExtrato">
		<br />
		<h3 style="margin-top: 0">EXTRATO</h3>
		<div align="left">

			<p:messages id="messages" showDetail="true" autoUpdate="true"
				closable="true" />

			<br />

			<p:tab id="dados">

				<h:panelGrid columns="15">
					
					Tipo:
					 <p:selectOneMenu value="#{extratoBens.destinoExtrato}">
						<f:selectItem itemLabel="CONTA CORRENTE" itemValue="CONTA" />
						<f:selectItem itemLabel="CAIXA" itemValue="CAIXA" />
						<p:ajax update="caixa,contaBancaria" event="change"
							listener="#{extratoBens.ativoTipoFiltro}" />
					</p:selectOneMenu>
					
					Caixa:
					 <p:selectOneMenu id="caixa" value="#{extratoBens.caixa}"
					 	disabled="#{extratoBens.ativaCaixa}">
						<f:selectItem itemLabel="Selecione um caixa" />
						<f:selectItems itemLabel="#{listaCaixa.descricao}"
							value="#{extratoBens.caixas}" itemValue="#{listaCaixa}"
							var="listaCaixa" />
					</p:selectOneMenu>
					
					Conta Bancaria:
					 <p:selectOneMenu id="contaBancaria" value="#{extratoBens.conta}"
					    disabled="#{extratoBens.ativaConta}">
						<f:selectItem itemLabel="Selecione uma conta" />
						<f:selectItems value="#{extratoBens.contas}" var="listaConta"
							itemValue="#{listaConta}" itemLabel="#{listaConta.titular}" />
					</p:selectOneMenu>
					
					
					 Data Inicio:
					 <p:calendar size="5" value="#{extratoBens.dataIni}" />
					 
					 Data Fim:
					 <p:calendar size="5" value="#{extratoBens.dataFim}" />

					<p:commandButton value="Pesquisar" update="tabelaExtrato"
						action="#{extratoBens.pesquisaExtrato}" />

				</h:panelGrid>

				<ui:include src="/privado/financeiro/dataExtrato.xhtml" />

			</p:tab>
		</div>
	</h:form>
</h:body>
</html>